import React, { Component } from 'react';
import { View, Text } from 'react-native';
import Search from 'react-native-search-box';
import * as constant from './../../style/constant';
import Icon from '../diyicon/IconFont';
export default class SearchBar extends Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <Search
        placeholder={this.props.placeholder}
        backgroundColor="#FFF"
        cancelTitle="取消"
        placeholderTextColor={constant.lightTextColor}
        selectionColor={constant.selectionColor}
        tintColorDelete={constant.lightTextColor}
        positionRightDelete={55}
        searchIconExpandedMargin={15}
        placeholderExpandedMargin={25}
        iconSearch={
          <Icon name="sousuo" size={12} color={constant.lightTextColor} />
        }
        iconDelete={
          <Icon name="quxiao" size={12} color={constant.lightTextColor} />
        }
        inputStyle={{
          height: 36,
          borderRadius: 18,
          backgroundColor: '#EDEDED'
        }}
        titleCancelColor={constant.subTextColor}
        cancelButtonWidth={50}
      />
    );
  }
}
